ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Laravel Blade

by SublimeText ALL Trending Top 100

Laravel Blade Template syntax for Sublime Text

Details

  • 2.1.0
    1.6.19
    1.5.3
  • github.​com
  • github.​com
  • 1 week ago
  • 1 hour ago
  • 12 years ago

Installs

  • Total 458K
  • Win 278K
  • Mac 92K
  • Linux 88K
Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28
Windows 11 17 13 11 14 9 25 18 9 5 6 11 5 10 9 28 5 5 15 13 18 19 32 11 5 5 8 12 16 9 8 10 8 4 14 14 12 8 12 7 7 3 8 7 3 6
Mac 2 8 1 4 4 3 7 3 5 3 4 5 4 8 4 1 3 1 1 5 5 5 2 3 0 2 1 6 5 2 1 0 3 4 2 1 2 1 2 2 2 2 1 1 0 2
Linux 4 2 4 2 1 5 4 2 5 2 4 2 2 6 2 3 2 1 4 5 3 6 0 7 2 4 2 3 2 2 4 0 2 3 3 7 4 1 1 5 3 1 3 6 3 5

Readme

Source
raw.​githubusercontent.​com

Blade

Laravel Blade Template syntax definitions for Sublime Text based on its HTML/CSS/JS syntaxes.

It is a fork of great Medialink/Laravel Blade Highlighter which is no longer maintained.

Installation

Package Control

The easiest way to install is using Package Control. It's listed as Laravel Blade.

  1. Open Command Palette using ctrl+shift+P or menu item Tools → Command Palette...
  2. Choose Package Control: Install Package
  3. Find Laravel Blade and hit Enter
  4. Restart Sublime Text (e.g.: if A File Icons is installed)
  5. Reopen any .blade files.

Manual Install

  1. Download or clone this repository into [install-dir]/Packages/Laravel Blade
  2. Restart Sublime Text (e.g.: if A File Icons is installed)
  3. Reopen any .blade files.

[!NOTE]

Syntax from main branch require Sublime Text 4.

For Sublime Text 3 compatible version refer to st3 branch.

Supported Extensions

Troubleshooting

§1 Syntax Definition Parse Errors

Blade extends Sublime Text's HTML syntax definition.

If Blade syntax highlighting doesn't work and console displays syntax errors in HTML (Blade).sublime-syntax, please make sure to remove any out-dated syntax override.

Steps:

  1. call Menu > Preferences > Browse Packages..
  2. Look for HTML folder
  3. Remove it or at least delete any syntax definition in it.

§2 Scripts are not correctly highlighted

Blade relies on JavaScript (source.js), JSX (source.jsx), TypeScript (source.ts) and TSX (source.tsx) to scope script blocks and inline scripts.

Make sure to remove related out-dated syntax packages, which don't meet least compatibility requirements.

They can be identified by calling e.g. sublime.find_syntax_by_scope("source.ts") in ST's console.

Known candidates are:

How to Contribute

  • To test a local version of the highlighter first uninstall the highlighter from package control.
  • Follow the manual installation process by cloning the repo into your packages directory.
  • Restart Sublime Text.
  • Open up the '[install-dir]/Packages/laravel-blade' folder into a new Sublime Text project.
  • Open up the blade.tmLanguage file and make changes.
  • I have provided a test.blade file that holds most of the common uses for testing the regex, use this to verify your changes before and after you make them to ensure the changes you make do not break anything.
  • Send a pull request with a single change per request.